'''
Version: 0.0.1
Author: ider
Date: 2021-07-06 15:22:22
LastEditors: ider
LastEditTime: 2021-07-06 15:34:55
Description: 
'''

import unittest
from logic import handle


class mytest(unittest.TestCase):
    ##初始化工作
    def setUp(self):
        pass

    #退出清理工作
    def tearDown(self):
        pass

    #具体的测试用例，一定要以test开头
    def test_read_link(self):
        data = handle.get_all_linksout(
            "/tmp/home/ni/data/wiki/wdd/2020/articleByCats/linksin_lv2_node_v5_newDB_new/all_linksout.txt")
        print(len(data))
        # self.assertEqual(myclass.sum(1, 2), 2, 'test sum fail')

    def test_read_subject_pages(self):

        data = handle.get_subject_page_ids(
            "/tmp/home/ni/data/wiki/wdd/2020/articleByCats/linksin_lv2_node_v5_newDB_new/arts_Physics.txt")
        print(len(data))


if __name__ == '__main__':
    unittest.main()
